﻿using System;
using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;


namespace com.guojin.mj.net.message.login
{
    public class SitDownReq: Message
    {
        public static int TYPE = 12 ;
        public static int ID = 31 ;

        public int SitDownType { get; set; }
        public int UserId { get; set; }

        public void encode(Output _out)
        {
            _out.writeInt(SitDownType);
            _out.writeInt(UserId);
        }

        public void decode(Input _in)
        {
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return string.Format("SitDownType={0}, UserId ={1} ",SitDownType, UserId);
        }

        public static SitDownReq create(int sitdowntype, int useid)
        {
            var temp = new SitDownReq();
            temp.SitDownType = sitdowntype;
            temp.UserId = useid;
            return temp;
        }
    }
}